package richrail.view;

import java.awt.Color;
import java.awt.Dimension;

import javax.swing.JTextArea;

import richrail.domain.Garage;
import richrail.tools.Logger;

public class TextualOutputPanel extends AbstractGarageDisplay {

	private static final long serialVersionUID = 1L;
	
	JTextArea text;

	public TextualOutputPanel(Garage garage) {
		super(garage);
		
		this.text = new JTextArea();
		this.add(text);
		text.setBackground(Color.BLACK);
		text.setForeground(Color.WHITE);
		text.setEditable(false);
		text.setPreferredSize(new Dimension(350,200));
	}

	@Override
	public void update(Garage garage) {
		text.setText(Logger.getInstance().toString());
	}
}
